All Questions
153 questions
1vote
2answers
475views
In what language does a method not return a value and a function does?
I don't know from where I got this but in my head a function returns a value and a method does not. I know that with OOP a method is a function related to a class. But I am trying to remember where I ...
-2votes
1answer
300views
Why aren't constructors atomic? [closed]
If thrown exceptions in constructors can lead to memory leaks or partially-constructed objects, then why we don't make them atomic? so neither an object nor it's local variables will get created/...
1vote
1answer
147views
How significant is the speed of native code for back end tasks?
Going native is extremely good for front end development. Whether its using android vs ionics, c++ vs dotnet/java, the benefits to GUI are significant. I was wondering if the same had significant ...
0votes
2answers
2kviews
Why are some languages called platform dependent if I can always share the source code?
I was reading about erlang when I read that it is platform-independent, using BEAM as the VM, now I understand that a VM compiles the byte code to machine code and this makes that language machine-...
-4votes
2answers
160views
Why is C++ not updated as frequently as Java? [closed]
Java was last revised in 2020, while C++ had it's update back in 2017
-2votes
1answer
988views
How to make code runnable on open source code editors like Ace Editor?
For my computer science uni project I'm required to build a web application with an integrated code editor. I believe I can just integrate open source editors like Ace Editor. However, I feel ...
4votes
4answers
2kviews
Why doesn't C++ support covariance in STL containers like C# or Java?
The Covariance and Contravariance feature is well supported in C# and Java collections. However C++ doesn't support them in their STL containers. Why is it so? For example the below code will ...
43votes
3answers
17kviews
Why is the logical NOT operator in C-style languages "!" and not "~~"?
For binary operators we have both bitwise and logical operators: & bitwise AND | bitwise OR && logical AND || logical OR NOT (a unary operator) behaves differently though. There is ~ for ...
60votes
11answers
15kviews
Why does C++ have 'undefined behaviour' (UB) and other languages like C# or Java don't?
This Stack Overflow post lists a fairly comprehensive list of situations where the C/C++ language specification declares as to be 'undefined behaviour'. However, I want to understand why other modern ...
6votes
2answers
539views
What is the best way to handle glue between different classicly OOP objects at the higher levels of abstraction?
In object oriented programming, it is commonly said that each class/object/instance should have a well-defined purpose. For example, there may be a Window class in a windowing toolkit, a ChunkLoader ...
3votes
4answers
2kviews
Why is the whole Hadoop ecosystem written in Java?
Developing Big Data processing pipelines and storage, you probably come across software which is more or less a part of the Hadoop ecosystem. Be it Hadoop itself, Spark/Flink, HBase, Kafka, Accumulo, ...
6votes
3answers
342views
Should a high-performance API expose low-performance utility functions?
Context: I'm working on an open source project to solve a problem that comes up in ad-tech and social media data mining: indexing boolean expression trees, and matching them against incoming documents....
-1votes
1answer
456views
How to organize the build system of a project as it starts including multiple languages across multiple operating systems and compilers?
I wrote a Music Player and Library in Java for GNU/Linux and Windows. My build process is currently in ANT, but I intend to migrate away from that to something more modern after the next release. I'...
3votes
4answers
1kviews
Is "Let more people able to review" a valid reason to "write c++ as if Java" at some degree?
According to Should we avoid language features that C++ has but Java doesn't?, I know it is horrible to write C++ as if Java, mostly because it drops the beneficial features of C++ languages. But ...
7votes
1answer
11kviews
Difference between header files and interfaces
I wanted to know whether the header files in c and c++ have same function as that of interfaces used in Java? If not what is the difference between header file and interface?